<!DOCTYPE html>
{% extends "base.html" %}

{% block content %}
<table>
    <tr valign="top">
        <!--<td><img src="{{user.avatar(128)}}"></td>-->
        <td><img src="/uploads/{{user.avator}}"></td>
        <td>
            <h1>User: {{user.username}}</h1>
            {% if user.about_me %}<p>{{user.about_me}}</p>{% endif %}
            {% if user.last_seen %}<p><i>Last seen on: {{user.last_seen}}</i></p>{% endif %}
            {% if user.id == g.user.id %}<p><a href="{{url_for('edit')}}">Edit</a></p>{% endif %}
        </td>
    </tr>
</table>
<hr>
<h1>我的博客文章</h1>

{% for post in posts.items %}

<table>
    <tr valign="top">
        <td>{{post.title}}</td>
    </tr>
</table>

{% endfor %}
{% if posts.has_prev %}<a href="{{ url_for('user', username = user.username, page = posts.prev_num) }}"><< Newer posts</a>{% else %}<< Newer posts{% endif %} |
{% if posts.has_next %}<a href="{{ url_for('user', username = user.username, page = posts.next_num) }}">Older posts >></a>{% else %}Older posts >>{% endif %}
{% endblock %}